/*
 * 文件名：DeviceServiceImpl.java
 * 版权：
 * 描述：TODO
 * 修改人：zuo liubo
 * 修改时间：2013-4-22 下午2:32:55
 */
package com.scpii.api.service.auth.impl;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.scpii.api.persistence.auth.DevicesMapper;
import com.scpii.api.service.auth.DeviceService;
import com.scpii.api.service.push.apns.ApnsUtil;

/**
 * @description 设备表service
 * @author zuo liubo
 * @date 2013-4-22
 */
@Service("deviceService")
public class DeviceServiceImpl implements DeviceService {

	@Resource
	private DevicesMapper devicesMapper;
	
	@Override
	public Long updateIOSToken(Long deviceId, String iosToken) {
		ApnsUtil.validateIOSToken(iosToken);
		devicesMapper.updateIOSToken(deviceId, iosToken);
		return deviceId;
	}

	

}
